package com.dd.duu.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dd.dc.entity.users.DUser;
import com.dd.duu.service.fallback.UserFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 描述: 用户Feign
 *
 * @author: yanglin
 * @Date: 2021-03-04-14:21
 * @Version: 1.0
 */
@FeignClient(value = "dd-user-service", fallbackFactory = UserFallBackFactory.class)
public interface UserClient {

    @PostMapping("/user/d-user/queryUserList")
    Page<DUser> queryUserList(@RequestParam int page, @RequestParam int row);

    @PostMapping("/user/d-user/insert")
    Integer insert(@RequestBody DUser user);

    @PostMapping("/user/d-user/updateById")
    boolean updateById(@RequestBody DUser user);

    @DeleteMapping("/user/d-user/delete")
    boolean delete(@RequestParam Integer userId);
}
